
GLOBAL  _getVendorID, _getProcessorInfo



SECTION .text


_getVendorID:
		push	ebp
		mov	ebp, esp
		
		mov	eax, 0	;get vendor ID
		cpuid		;12 character ASCII string 
					;stored in EBX, EDX, ECX
		mov	[cpuidReturn], ebx   ;
		mov	[cpuidReturn+4], edx ;
		mov	[cpuidReturn+8], ecx ;
		mov	eax, 0;
		mov	[cpuidReturn+12], eax  ; '\0' del string 
		mov	eax, cpuidReturn ;return puntero a string 

		pop	ebp
		retn


_getProcessorInfo:

		push	ebp
		mov	ebp, esp
		
		mov	eax, 1	;Processor Info and Feature Bits
		cpuid		;
				;
		mov	[cpuidReturn], eax   ;model and family
		mov	[cpuidReturn+4], edx ;feature flags
		mov	[cpuidReturn+8], ecx ;feature flags
		mov	[cpuidReturn+12], ebx  ;aditional feature info
		mov	eax, cpuidReturn ;return puntero a la informacion

		pop	ebp
		retn


cpuidReturn:
	db 16

		
		
		



